/* sod.t - SO_MSTR delete trigger                                            */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                       */
/* All rights reserved worldwide.  This is an unpublished work.              */
/* $Revision: 1.1 $                                                         */
/*                                                                           */
/* This program will delete external storefront order xref records from      */
/* qad_wkfl when corresponding so_mstr records are deleted.                  */
/*                                                                           */
/* $Revision: 1.1 $   BY: John Pison            DATE:01/25/01   ECO: *N0VZ* */
/*                                                                           */
/*V8:ConvertMode=NoConvert                                                   */


TRIGGER PROCEDURE FOR DELETE OF so_mstr.

/* Identifier for procedure that adds these workfile records */
&SCOPED-DEFINE WORKFILE-KEY ncapis.p

/* Delete storefront order xref record for the current SO */
for first qad_wkfl exclusive-lock where
   qad_key1 = "{&WORKFILE-KEY}" and
   qad_key2 = so_nbr:

   delete qad_wkfl.

end.  /* for */
